How to build a LiveCode external for iOS 7? - livecode

I've been scratching my head on this for a while. I need to build a LiveCode external for iOS 7, but the most recent LiveCode SDK (LiveCodeSDK-R14) only has support through iOS 6.0.
I've followed these instructions (http://livecode.com/developers/guides/externals/), and got to the point that I could see that the LiveCode scripts expect to be able to copy from an LiveCode folder that corresponds with iOS 7 which doesn't exist (RunRev/Components/LiveCodeSDK/components/5_5_3/device-7_0 and simulator-7_0).
I reinstalled iPhoneOS6.1.sdk and set my xcode project to build with this (had to follow these steps - Xcode 5 with iOS 6 SDK: 'UIAccelerometer' is unavailable: not available on OS X).
So, the external builds now. I get a .lcext file whose internals look like this:
M Filemode Length Date Time File
- ---------- -------- ----------- -------- --------------------------
-rw-r--r-- 68440 14-Dec-2013 14:55:08 iOS/External-Device-7_0
-rwxr-xr-x 19616 14-Dec-2013 14:58:00 iOS/External-Simulator-7_0
-rw-r--r-- 68440 14-Dec-2013 14:46:34 iOS/External-Device-6_1
-rwxr-xr-x 20040 14-Dec-2013 16:14:54 iOS/External-Simulator-6_1
- ---------- -------- ----------- -------- --------------------------
176536 4 files
It looks like I should have the libs to load the external on the device and simulator in either iOS 6.1 or 7.0.
Simulator
When I test in the simulator, the code after I call the external function doesn't run, so I assume it's erroring-out trying to load the external? Any way I can see what's happening here?
Device
When I build the stand-alone, I get this error -
performing iOS arvm v7 (or universal) device builds requires the iOS 7.0 SDK platform to be installed (available with XCode 5.0 or later)
But, according to XCode, I have the iOS 7.0 SDK installed.
Versions
Xcode Version 5.0.2 (5A3005)
LiveCode Community Edition 6.5.0 build 3009
Seems like I'm missing something - it shouldn't be this hard to load a simple library. Any suggestions?

You can put your code in a try/catch block to get the details of the error.
try
yourCommand
catch e
put e
end try
Put here does an NSLog so you can look for logs in Console for the simulator or Organizer for device. You will get mostly a list of numbers which you can decipher with this.
As for the error you are getting when building device builds it sounds to me like you might not have added Xcode 5 to your mobile support prefs in LiveCode.

Related

Does MtouchSdkVersion setting affect what version of iOS we can run on?

When deploying an existing Xamarin forms proj from Visual Studio I was getting errors like "Failed to load AOT module ‘System.Net.Http’ while running in aot-only mode". This had worked in the past, it seemed Xcode had recently updated before I hit the problem. I found I was able to get the project deploying by changing the csproj entry 10.0 to 10.3. It looks like I could change this setting and everyone would be ok if they also had updated xcode.
My concern is: Does this change what versions of iOS the application can support? Would it have any other surprises when deployed to the apple store?
One thing I don't understand is I am the only person seeing this issue. Another developer is able to deploy to an iOS device (iPad instead of an iPhone) that also has the latest version of iOS without problems. Running “xcodebuild -version” shows we have the same version of xcode installed (8.3.1) and running “xcodebuild -showsdks” shows we have the same iOS sdk available (iOS 10.3).
There is some good documentation on the iOS SDK version: https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/cross_development/Overview/overview.html#//apple_ref/doc/uid/20002001-BABEBGCF
You can build against a higher version of the SDK and run against lower versions of iOS.
Building against different versions of the iOS SDK can cause differences in behavior, these may show as regressions in your application.

livecode and mergext dropbox and 7.1 Simulator

I added the location of the .lcext file then tried to test on iOS
When trying the DropBox test app I get the following:
573,4,1,mergDropboxSetup
253,3,1
I also get this:
1 Could not find appropriate build of external '/Users/sims/Desktop/MERG FILES/mergDropbox-1.0.5/mergDropbox.lcext' for Simulator-7_1
What does this mean?
The most recent version of mergDropbox is 1.0.6 and was released on 24th March this year.
That version should work.

Facebook iOS SDK: App crashes right after starting with "Symbol not found: _ACFacebookAppIdKey." only in iOS 5

Symptoms: app crashes right after starting:
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x00000001, 0xe7ffdefe
Crashed Thread: 0
Dyld Error Message:
Symbol not found: _ACFacebookAppIdKey
Referenced from: /var/mobile/Applications/C9CCEC42-DD12-40D1-91EE-965A8AC37AE4/MyApp.app/MyApp
Expected in: /System/Library/Frameworks/Accounts.framework/Accounts
in /var/mobile/Applications/1234EC42-0012-40D1-1234-965A8AC31234/MyApp.app/MyApp
Dyld Version: 199.6
This problem is specific to the MonoTouch binding for the Facebook iOS SDK, and it only happens for iOS 5.0 and 5.1. It can be reproduced by simply running the sample project on an iOS 5 device.
There's a related SO question (Facebook SDK 3.1 for iOS - runs on iOS6, but crashes on iOS 5.x) which suggests making the framework optional. As far as I know, this cannot be done from Xamarin.iOS, but the LinkWith assembly attribute in the binding already has WeakFrameworks = "Accounts AdSupport Social", which I assume is the equivalent of making those frameworks optional in XCode. So, no help there.
The problem seems to be a bug in the MonoTouch binding, Xamarin.iOS, or the Facebook iOS SDK itself. Any ideas?
It can be solved very easily..
Click on your project Targets.
then go to summary
Under Linked Frameworks and Libraries
Change Required Option into Optional of three Frameworks are :
Social.framework
AdSupport.framework
Accounts.framework
Now you can also run and check your code on iPAD or iPHONE simulator 5 or 5.1
This is a known bug which has been fixed (but the fix hasn't reached any stable version of Xamarin.iOS yet - the bug report says it'll be included in the 6.2.2 release, but that didn't happen).
Currently the only known workaround is to use an older version of the Facebook SDK.

MonoTouch - .NET 4.0 on an iPhone

We've upgraded to MonoTouch 4.0 and the new MonoDevelop.
In order to get .NET 4.0 , do we need to enable a setting, or does MonoTouch automatically compile against the newest Mono ?
Everything has been working perfectly, iTunes has accepted all our apps, all without issue. We've released now nearly 70 apps made with MonoTouch and have thousands of users.
MonoTouch 4 requires that you have previously installed Mono shared runtime 2.10.1 in order to install it.
Once you have installed Mono runtime, MonoDevelop and of course ios 4.3 sdk now you can install monotouch 4, once installed you are now able to get Net 4 love by creating a new iphone solution :) (yes you dont have to modify any settings)
Hope this helps
Alex
As far as I can tell from MonoTouch's website ( http://monotouch.net/Releases/MonoTouch_4/MonoTouch_4.0.0 ), it says "Core Mono Runtime upgraded to Mono 2.10" so it looks like dmcs ( http://www.mono-project.com/Release_Notes_Mono_2.10 ) is included. I don't have MonoDevelop installed, but I might be able to help you out with my suggestion:
Look in Project -> Options -> Build -> General -> Runtime Version (I couldn't post more than 2 links since I'm a new user.)
I hope this answers your question.

"Invalid Application. Delete?" only when compiled with a Nokia SDK

I'm developing a piece of software for my University and am currently attempting to implement NFC functionality which requires me to move from my standard Sun wireless tool-kit platform (implemented through NetBeans) to a Nokia platform (also implemented through NetBeans).
The problem is, whenever I compile the code with the Nokia platform implementation and run the program, on the Nokia phone I have or in the emulator, the phone displays a box stating "Invalid Application. Delete?" with a yes/no answer. This stops the installation of the application. The strange part is that if I compile the exact same code with the Sun platform implementation it runs without any issues on the Nokia phone. I have tried this with two different Nokia SDKs (the Series 40 Nokia 6212 NFC SDK and the Series 40 5th Edition SDK) with the same results.
What is the Nokia SDK doing differently?
There seems to be some kind of discrepancy between a project created using a Sun platform and a project created in a Nokia platform.
Although the original program, initially created with the Sun platform, compiled with the Nokia platform caused the application to be invalid, when I created a new project from scratch using the Nokia platform and just copied the source of the original program over the program worked. There is no discernible difference in the JAD/manifest files between the two.
If you've copied source code, you may have not copied the "manifest.midlets", i.e. tells the OS which "forms" to create. You'll usually find this in the project properties.
(e.g. in NetBeans IDE - Application Descriptor, "Midlets" tab - it shouldn't be empty).
Make sure that the following attributes (key:value pairs) are in the JAD file and also the manifest file in the JAR file:
MIDlet-Name
MIDlet-Version
MIDlet-Vendor
MIDlet-Jar-URL
MIDlet-Jar-Size

Resources