Saturday, March 17, 2018
HTML front end with back end with Objective-C
We are in the process of revamping all our iOS apps recently using: HTML+CSS+JavaScript to handle the front end and the back end is handled by Objective-C. The development became very interestingly for both UI designer and the programmer.
Before we took this approach, we were adding new functionality using Swift. After a few version upgrade on Swift/XCode, we found out that compilation error and warning will make us go mad. We don't think we can handle this and we don't like this to happen again and again. So, we decided to migrate all Swift codes that we have written back to Objective-C.
The next thing we are facing is the UI (user interface) and we are tiring in looking for solution on showing the popup and adjust the coordinate the popup appear in the correct position, etc. The storyboard file is particularly another bottleneck and wasted a lot of hours in "waiting for others to complete before they can start work".
With the new approach, the UI designer will work on the HTML+CSS. Once the layout has been confirmed by the team, the UI designer will continue to work on beautifying it and the Javascript & Objective-C programmer will start coding.
This approach reduce the development time as well as adding new features tremendously.
Time wasted in Swift version upgrade:
- New attribute
- Casting with ?, ?? or !....
- Casting between the data type: NSString, NSString?, NSString!....
Time wasted in implementing new idea using Storyboard:
- How to show a popup window.
- How to position the popup window correctly.
- How to partition a "view" into smaller view(s)/component(s) and then aggregate it to what we want.
- Screen flow/navigation.... try this API.. not this one, try another one... ah... obsolete API, look for new API... endless.. :(
With new approach:
- HTML+CSS - that's my what my UI designer good at.
- Javscript - that's what we are doing for web application since 2008.
- Objective-C - this is not the area that we are good at and we can't afford to spend too much time in researching for the correct code. But, we need is to store the data and load the data. Since we are good in SQL statement and we decided to store the data in SQLite.
Future upgrade for the app...?
- Adding new HTML elements.. small problem.
- Reposition the popup... small problem.
- Revamp the color theme... small problem.. just replace the color and background color in CSS.
- Adding new screen... just add a new HTML file.
- Adding new function... just add a new Javascript to handle and some backend code in Objective C.
Our objective is to minimize the upgrade time and cost. Another thing is that we don't need to use any big framework that is already doing this (you can Google search for it) because those framework upgrade might break and we need to spends many hours in chasing their tail.
We love programming but we don't like to chasing the tail become someone decided to make some API obsolete and replace it by some new API.
:)
Labels:
iOS,
iOS Browser,
Object-C,
StoryBoard,
UIWebView,
Web Browser
Sunday, March 11, 2018
ERROR ITMS-90717 while uploading app
While I was uploading my app to Apple App Store using Xcode 9, the following error appear:
ERROR ITMS-90717: "Invalid App Store Icon. The App Store Icon in the asset catalog in "xx.app" can't be transparent nor contain an alpha channel".
To resolve this error, you need to
1. Remove the alpha (i.e., the transparency attribute) in the image file. This can be done easily.
1.1. Double click on your app icon and the image will appear Preview app.
1.2. Choose File \ Export.
1.3. Untick "Alpha" (as shown below).
1.4. Click Save.
So, you have done the first step.
2. Regenerate all the icon file in various dimension.
3. Replace all the icon files in your project.
4. Last step, update the Images.xcassts file by dragging all appropriate
icon file.
To check if all icon files have been updated, open the following directory in Finder. Ensure that all icon files' date/time matches the date/time that was done in step 2.
[your app] \ Images.xcassets \ AppIcon.appiconset
5. Build and upload your app.
ERROR ITMS-90717: "Invalid App Store Icon. The App Store Icon in the asset catalog in "xx.app" can't be transparent nor contain an alpha channel".
To resolve this error, you need to
1. Remove the alpha (i.e., the transparency attribute) in the image file. This can be done easily.
1.1. Double click on your app icon and the image will appear Preview app.
1.2. Choose File \ Export.
1.3. Untick "Alpha" (as shown below).
1.4. Click Save.
So, you have done the first step.
2. Regenerate all the icon file in various dimension.
3. Replace all the icon files in your project.
4. Last step, update the Images.xcassts file by dragging all appropriate
icon file.
To check if all icon files have been updated, open the following directory in Finder. Ensure that all icon files' date/time matches the date/time that was done in step 2.
[your app] \ Images.xcassets \ AppIcon.appiconset
5. Build and upload your app.
ERROR ITMS-90029 while uploading using Xcode 9
While I was uploading my app and encountered this error:
ERROR ITMS-90029: "Storyboard file 'Main~iphone.storyboardc' was not found. Please ensure that the specified file is included in the bundle with any required device modifiers appended to the filename".
What happened..? My app supports iPad only and how come it prompted an error on missing iPhone storyboard..?
I guess, there is some problem caused by upgrading the project. Why "Main~iphone.storyboardc"? I opened the .plist file and found this:
Main storyboard file base name: "Main" <=== this value shown in the error message.
Main storyboard file base name: "StoryboardV2" <== this is correct value.
Anyway, the problem can be rectify by
1. Opening the Target > your app. Look for "Devices" in the Deployment Info section. For my case, my value is "iPad".
2. Changing the "iPad" value to "Universal".
3. Set the Main Interface to any value.
4. Click on any source code file to force the new values to be saved to .plist.
5. Open the Devices in the Deployment Info section again.
6. Change the values back to "iPad" and the correct Main Interface value.
7. Archive and upload my app to App Store and the error has gone.
ERROR ITMS-90029: "Storyboard file 'Main~iphone.storyboardc' was not found. Please ensure that the specified file is included in the bundle with any required device modifiers appended to the filename".
What happened..? My app supports iPad only and how come it prompted an error on missing iPhone storyboard..?
I guess, there is some problem caused by upgrading the project. Why "Main~iphone.storyboardc"? I opened the .plist file and found this:
Main storyboard file base name: "Main" <=== this value shown in the error message.
Main storyboard file base name: "StoryboardV2" <== this is correct value.
Anyway, the problem can be rectify by
1. Opening the Target > your app. Look for "Devices" in the Deployment Info section. For my case, my value is "iPad".
2. Changing the "iPad" value to "Universal".
3. Set the Main Interface to any value.
4. Click on any source code file to force the new values to be saved to .plist.
5. Open the Devices in the Deployment Info section again.
6. Change the values back to "iPad" and the correct Main Interface value.
7. Archive and upload my app to App Store and the error has gone.
Subscribe to:
Posts (Atom)