include content file inside PCL within Xamarin iOS app - ios

I have a Xamarin.iOS app. It links to a C# PCL. Within the PCL, I have a text file Foo.txt. Its build action is set to Content and Copy Always. Yet when running on the iOS simulator from Visual Studio, I usually can't find it anywhere in the app bundle.
One time I actually did find it, at:
PortableLibrary/Foo.txt.
But other times it has not appeared. What could be the matter?

Just tested it on the latest Xamarin.IOS version and it works just fine. Make sure that you rebuilt after changing the file settings. But its not found within the .app file if thats what you mean.

Related

Air ios imported swf (no code) suddenly starts giving 'Uncompiled AS' error

I'm building an iOS app with FlashBuilder 4.7 and Air SDK 25.0. The app has code which installs fonts via an external SWF imported at runtime (no code in external SWF, just fonts). Imported file has been working for months but now throws below error in debugger on device :
'Uncompiled ActionsScript'
I have gone back through previous builds and some that had been working fine suddenly throw error on the swf file. Other old builds will work importing the same swf, but after running a build which fails, the working one will start throwing error!
Anyone else struck a problem like this?
I recently upgraded from SDK 22 to 25, but the problem appeared some time after that. Only significant change was running a dodgy zip ANE that crashed the debug. I've removed the ANE, but I suspect something may have been corrupted somewhere.
I've tried resetting FlashBuilder settings by deleting .metadata folder in workspace.
Tried Cleaning the projects, tried duplicating projects, tried re-publishing the swf to import.
Can't work out why some builds don't work and others do, but then stop working with no changes to the project. I feel sure there is a fix that will suddenly make all of the builds work again...
Any suggestions anyone?
I found my problem.
It appears I have previously been using only the 'Fast' packaging method to test app on ios device, which works.
When set to 'Standard' (Build) packaging to test on device it causes the swf (with embedded fonts) imported at runtime as having 'uncompiled actionscript'.
This answers my original query, but if anyone has a work-around, or alternate method of importing fonts at runtime, I'd be very happy to hear!

MergJSON LiveCode External for iOS standalone setup

Currently we are only testing LiveCode 7.0.4 to see how it works and if we want to even use it. In our apps we need JSON from our server and have setup the mergJSON library/External in Livecode. So far, this is working very nicely in standalone tests for both MacOS and Windows. Today I started doing some simple tests on iOS and I am having a hard time with it.
I found answers where we need to use the Copy Files section in Standalone Settings, and that we need to copy the *.lcext file for mergJSON. Also watched the youtube how-to video that had mergSettings. There are no .nib files for mergJSON. Only .so, .dylib, and .dll, and the .lcext. I tried to add the .bundle file like the video, but the app will not launch, only black screen. Are other files required for mergJSON? And where do we put them? Do they stay in the same Externals folder structure or in project folder. Also, does an IOS runtime folder need to be created like in Widows/Mac? The app runs, no errors, but no JSON results are returned. I guess I am just a little confused on the Externals setup for iOS.
Just quick notes of our environment. We have Xcode 6.2 and the iOS Sdk 8.2. Live Code is 7.0.4 GPL (just testing and learning this way for now, will purchase commercial once I learn more.) I think the mergJSON I have is 1.0.15, downloaded from mergext.com. (which appears to be offline today) I have only tested on the simulator.
Thanks for any help.
You only need to include the lcext file in the copy files section of standalone settings. No need to setup a runtime folder for iOS etc.

Build a Chrome Packaged Application in WebStorm 8

I would like to switch from Dart Editor to WebStorm 8. But I am not able to compile my project as a Chrome Packaged App. I can simply run the HTML Files, which are completely ignoring my manifest.json and all chrome specific libs I'd like to use.
Can anyone give me suggestions how to add such a run configuration? Many thanks in advance!
Are you talking about building or debugging your chrome app?
AFAIK, you don't need to compile anything to debug your dart chome app.
You just have to create the right manifest.json and its background.js file to create the window/service.
If so, you can load your project directory directly in dartium by using the load unpacked app feature or by using the official chrome app developper extension.
If your manifest.json and background.js are fine, your app ll show up in a dedicated window.
Then, you just have to do a right click + refresh the application inside the chrome app window to apply the code changes.
It completely works for debugging, but i never tried to build a release from WebStorm...

Where is the Deployement Screen

I am trying to keep my application in the background on the iOS platform using firemonkey.
I have came across an answer witch tells me how to make the application remain in background.
Here is the answer:
You'll need to copy the info.plist file and modify it using a unix EOL
friendly editor (such as Notepad++). Add the following lines to it:
UIBackgroundModes voip
In the Deployment screen for your project, uncheck the original
.info.plist, and add the copy you modified. Note that if you
change any project options that changes the original, you'll need to
go thru this process again, or just reflect the changes in the
modified file.
How ever I can't figure out where is the Deployment screen. Does anybody know ?
(NOTE: I don't do iOS development, so this info is based on some quick experimentation with a new iOS FMX project in XE5.)
Those instructions are for XCode, which isn't Delphi. Delphi doesn't have the XCode deployment screen.
The Delphi equivalent is in Project->Deployment from the IDE main menu. You can locate the .plist file in the Local Name column, in the form YourProject.info.plist. I think the original copy is actually generated when you build your project for deployment (either Release or Debug) to the simulator or device, so you may have to do that first in order to find it.
If you look at the samples for XE5 (which seems to be the one in Samples\Delphi\DataSnap\connectors\iOSClients\client_company_tweet), you can see where they're located once the file has been generated.

Application not getting deployed on Blackberry simulator

I am tried deploying .cod,.alx.jar files on blackberry simulator 8100;the application is not getting deployed on phone.I am using Blackberry plugin for Eclipse.
How can I solve this issue?
Please help
Update
Hi,
Thanks for your reply.
I am trying to run the application the way you suggested.
Do I need to setup new run configuration every time I run any project?
What should be default value for build configuration ? [Debug,Private,or Release]
Copying the .cod files into the simulator's directory (where all the other .cod files are) and restarting the simulator will work.
Probably though you want to automatically deploy from Eclipse. If this isn't working for you, there are a couple of things to check:
Check that the project has been activated for BlackBerry - from the right-click menu for the project, make sure that Activate For BlackBerry is checked.
If that's already checked (as it is by default when you create a new BB project), then sometimes explicitly building the project will do the trick: From the Project menu, choose Build Active BlackBerry Simulation
EDIT: In response to some comments below I thought of something else. The configuration you choose may have something to do with your problems (BlackBerry -> Build Configurations). The configuration in the JDE Plug-in doesn't affect the code generated, but it does affect which projects are activated for BlackBerry. If you switch configurations, your project may become un-activated.
Since it doesn't affect the code, I usually just pick one configuration and stick with it throughout debugging and release.
You might be missing 'jar' in your PATH. If so, the eclipse BB plugin silently fails and your application won't be pushed to your simulator plugin directory. To see this failure within eclipse, choose 'Project > Build Active BlackBerry Simulation'.
If you don't have jar in your path, then you will see:
I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified rapc executed for the project
So, if your JDK is here:
C:\Sun\SDK\jdk\bin
Then append it to your system environment's PATH variable, then re-run 'Build Active BlackBerry Simulation' and you should see:
rapc executed for the project [YOUR PROJECT]
Here are a couple of ideas:
1) If you have any build errors then the application won't deploy to the Simulator. The Eclipse compiler (that underlines compile errors in red) is different to the "rapc" one that creates the binary for the Simulator. I have heard of situations where the Eclipse build seems to work, but the rapc compile fails - check the Console for the detailed rapc output (this might not look like a normal Eclipse build error).
2) In the Eclipse menu, open BlackBerry -> Configure BlackBerry Workspace.
Under BlackBerry JDE choose Code Signing and make sure the three RIM checkboxes are selected. I had compile errors when these weren't selected.
Under BlackBerry JDE choose Installed Components. Choose to use the Component Package 4.7.0 as I have heard of problems with the 4.5.0 Simulator.
You should delete all these extra answers you posted, or you might get downvotes - they should be comments instead of answers.
Check if your simulator is set up to clean the file system / configuration before launching the simulator. Simulators can be set up like this. If you deactivate it, the application should not disappear.
For future readers, there is another possibility for this issue. Check your workbench project directory (folder) for a ProjectName.err file. This may provide a clue as to why your build is silently failing and thus not deploying. In my case, it was an "Error!907", a new icon I added to my project was too big. There was absolutely no other indications in Eclipse 3.4.1 that there was a problem in my build.
Just ran through the same kind of problem : project compiled fine but didn't deploy on any device or on any simulator, even though the debugger said it was attached !
The problem came from a .zip file that was located in the ./src directory of the project, deleting or moving it somewhere else resolved this case.
I wish I hadn't spend 2+ hours on such a stupid problem :/
I know this is old, but you have to do the "generate ALX" option from right clicking the project menu as well or it won't deploy, at least it doesn't for me.
I ran into the same problem again and none of answers posted here worked for me.
I played around and finally made it work. The problem was that the output file name contained a hyphen ('-'). Changing this name in the Build section of BlackBerry app descriptor did the trick.
I mean, how stupid a developer must be to slip that kind of bug. No error reported and why reject the names with hyphens in the first place? Give me back my two hours RIM "developers"!
I had the same problem. The reason was using 'ΓΌ' character in the title.
I have been facing this problem today, but with a MIDlet project. It turned out to be that I forgot to specify the "Name of main MIDlet class" in the BlackBerry Application Descriptor (BlackBerry_App_Descriptor.xml). Once I specified it the application appeared on the simulator correctly.

Resources