iOS PhoneGap 2.3 Config.xml Confusion - ios

Okay so I am trying to port my Android app that is currently using PhoneGap over to iOS. In the Android world I used the config.xml file to store settings such as splash screen and screen timeout along with icon urls. The issue I am having is how do I get this to work on iOS in xcode? In the sample PhoneGap project from Adobe they state that the cordova.plist file is gone in 2.3 and is replaced by config.xml, but then adobe goes and states that the config.xml file is used for the Adobe PhoneGap App Builder. Where do I store my settings if I dont want to use the App Builder? I have the packages installed correctly, because my app loads fine, but I cannot seem to change any of the splash screen or timeout settings. Any help would be appreciated!

If I understand you correctly, you want to update your splashscreen.
You should replace the defaults png files via xCode finder in the left side of the workspace.
Then, just clean and rebuild.

Related

How to build reactnative v0.45 project to ios realse

I'm using the latest reactnative verion 0.45 and I didn't get a clue on the official doc about how to build the ios release.
About how to the running on ios device section of the doc quoted here:
Connect your iOS device to your Mac using a USB to Lightning cable.
Navigate to the ios folder in your project, then open the .xcodeproj
file within it using Xcode.
But there is no ios folder found after running command npm ios. And most StackOverflow answers like this one require a command like react-native-bundle which was not found either.
I have already got Xcode and an app develop member account and Really want to build my first reactnative app to my iphone before I could do more stuff on it.
I know this might be a very newbie question. If someone could just give some guide or throw some docs about this?
I stuck on this problem since a few days too, unless you will not get an ios or android folder any more with React Native 0.45.
You can build your standalone app by using Expo: https://docs.expo.io/versions/v17.0.0/guides/building-standalone-apps.html
As I understand, they build your app for you online, so it takes some time and require an free expo-account, but after it finised, you can download your .apk or .ipa to submit it to Play Store or AppStore.
When you want to add more custom (non javascript) code to your project and edit it in Andoid Studio or Xcode, so you have to eject your from Reative Native: https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md
After that, you can test your App by building for your own in the simulator, with no need of the Expo-App.
Open the ios folder of your project using xcode
Connect your phone and select your phone from the device selection dropdown
Select the first tab in the explorer and go to signing area, select your development team
Click play and it will install the app in your phone on development mode
For Production build, you can do the same. However, you would need to change your scheme to production:
Open scheme menu under product. From the dropdown, look all the way down, you'll find the menu Edit Scheme, select this.
Select the Release scheme, hit close and re-run your project in your phone.
Note: if you are building for release, make sure your target device is Generic iOS Device
Hope it helps! :)

Cordova Build on Android Not Using Code from WWW Folder

I'm using cordova to package up a pre written angular js application by placing the contents of the app into the www folder inside the cordova sturcture and running the following commands:
cordova platform add ios
cordova build ios
cordova emulate ios
The app then loads on the ios emulator, but instead of the app content as I would expect to see, it shows the hello cordova index file. I have done the exact same thing for android and it works perfectly on that and shows the app correctly. Any help with finding out why the default cordova index page is still shown would be great thanks.
Managed to get it working. When I built the code using cordova, I then opened the xcode.proj file in xcode, and that has done something to some of the files, and it was causing the app to crash at the splash screen. This is why I thought it was not using the www/ code as the splash screen is almost identical to the hello cordova default index file.
Using the cordova emulate command line option to run the app without touching xcode allows the app to run correctly.

Can't test Cordova app when open it in browser

I created a Cordova app using the 4.3.0 version and the project for an iOS project.
Whenever I open the index.html (www folder) file in a desktop browser, it gets stuck in an infinite loop requesting gap://ready.
Why is this happening? How can I solve it?
Thanks a lot.
EDIT AND UPDATE:
The iOS app was not working because there was a plugin missing: https://github.com/apache/cordova-plugin-network-information/blob/master/doc/index.md
I added it, then build the project again, and it worked.
You can't test an iOS project on a regular browser, if you want to test on a browser, add browser platform
cordova platform add browser
then
cordova run browser
Don't do this way. Make your site in normal way using XAMPP/WAMP. Copy all the same code and folders. Then Check it. Whatever you make change in XAMPP Site, update it in PhoneGap. It is easier this way.
Both answers wrong. The most correct way is run in your phone simulator or actual device.
For android
cordova emulate android
For ios you need a Mac machine and Xcode.

Drupalgap developed IOS app not working after renaming from ExampleApp to a custom name

A hybrid app was developed using Drupalgap cordova for iOS. The project is named ExampleApp, as followed by a tutorial, and once started in Xcode (5 and 6) the app works well in iOS simulator. Now I need to rename the app to a custom name to put it for submission in the App Store, but once I do that in Xcode, the app breaks. I followed the official Apple Support page to do that and the one here on stackoverflow with no luck. The app is present on iOS iPhone simulator dashboard with the icon and a new name, but once it starts loading the splash screen, it breaks as soon as it loads it. What is the best way to resolve this problem?
Here's what I would do:
use the PhoneGap Command Line Interface to create a new "official" project: cordova create OfficialApp com.official "OfficialApp"
add the iOS xCode project files: cordova platform add ios
install the DrupalGap SDK on top of the empty project
copy the www/app folder from ExampleApp into your new empty project's www/app folder
prepare/build the app from the terminal
test in xCode simulator
Be sure to replace any custom modifications you had to the index.html file of your new Project. More info: http://drupalgap.org/node/193
Each step of the way, I'd recommend doing a prepare/build via the terminal and then launch the app via xCode to verify PhoneGap works out of the box, then DrupalGap works out of the box, then drop your app on top and run it.
If these steps don't work, I'd recommend opening up an issue in one of the queues:
http://www.drupalgap.org/support

Phonegap 3.3-3.4 How to add icon for IOS

I am building IOS on cloud. My local phonegap project only runs on android sdk, no ios sdk. Hence, I do not have the folder structure for ios.
Where should i place the app icon for ios ? I believe the default \www\res\icon path is not working. I have to manually place my android icon in \platforms\android\res\drawable for my android icon to work.
i am using a hook for copying these files, because it seems that cordova is not able to do it.
http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/

Resources