tns livesync ios --emulator --watch
Unsupported version Xcode 8
Oh no …
It’s That Time
The iPhone 7 is out along with iOS 10 and things have changed. It hit me today when I was toying with my company’s app for the first time since upgrading Xcode.
So what do? Well, the first thing I needed to solve was getting my apps running in Simulator again. I opened up Xcode and built my app in there instead of the command line tns. I ran it on iPhone 7 Simulator and everything popped up and seemed to be working until it crashed right away on launch.
Upgrade NativeScript to “Next”
I uninstalled NS and the tns modules and reinstalled completely using the next version (2.4).
npm uninstall nativescript -g
npm uninstall tns-core-modules
npm install nativescript@next -g
npm install tns-core-modules@next
Properties Not Methods
So something big is happening. Xcode is changing some big core items from using methods to initiate and instead using properties. For example I use local-notifications plugin to send phone notifications. I was erroring out with:
NSNotificationCenter.defaultCenter() is not a function
Apparently that is now a property so I had to adjust the module’s code in local-notifications.ios.js to
And it works just fine now. Or so I believe, no more errors but haven’t tested it thoroughly.
plist.info Permission Changes
Next the app crashes when I try to open the camera. I’m getting errors saying there’s permission issues. Turns out I need to have some new info in app/App_Resources/plist.info
<key>NSPhotoLibraryUsageDescription</key> <string>Photo Library Access Warning</string>
More To Come
This is all so far but I’ll be sure to add more information as I encounter it.