I have recently installed the newest version of Cordova (phonegap) 3.4.1 on my iMac. Downloaded the helloworld app. Built it according to the documentation in the platform guides at the command line. Opened xcode (5.1.1) and opened the helloword.xcodeproj file. I see all the files that I expect under WWW directory. Selected a simulator and clicked the Build button. I get the message that build succeeded.
And that's it. I can't seem to run it.
command-R is grayed out. I can't find any configuration that allows Build and Run.
When I did native iOS app development a couple of years ago using XCode 4.x I had the option of build or build/run. I don't see that similar information now.
Basically I just want to see the freaking program run in the simulator and my friend Google is letting me down.
Related
Trying to build a React Native iOS app, and while I got it running fine using Android, trying to get it running on iOS has been a bit of a nightmare.
I created this base react native app, back in Sept 2022, doing the typical npx react-native init <projectname> and was working on android mostly (I use a linux box, and I have to use Teamviewer to connect to a mac to build the iOS apps).
I had my app working fine in android and iOS, and then added the Zoom Video SDK and everything went to hell. Got it working fine in Android, and tried to take my changes and build them in iOS but I couldn't get it to work, and seemingly got my iOS project corrupted, so I tried to create a fresh iOS project, by basically created a same-named project in a different directory, and replacing the <projectname>/ios with the new base ios project.
Of course, I did this Jan 2023, so it's the new architecture, and the AppDelegate.h tries to import the RCTAppDelegate.h file instead of React/RCTBridgeDelegate.h
I do my usual yarn install go into the ios directory and pod install and then try to do a yarn run ios and it tells me it can't find RCTAppDelegate.h
Anyone solve this yet? The React-Native docs aren't up to date with their github repo
I got the same error, i solved it by opening the .xcworkspace instead of opening .xcodeproj
I also cleaned the build folder by
Product --> Clean Build folder
and then it successfully built the app.
Following the Readme of the https://github.com/flutter/plugins/tree/master/packages/firebase_messaging I set up the IOS and Android firebase. On Android it works but when I try to install the app by running "flutter run" on IOS, it gets stuck at installing it and I can't open it.
After I took the screenshot a new line appeared under "Installing and launching", "Configuring firebase for this app..." (or something like this).
I tried deleting the pods and set up again.
I tried deleting the app so it can be installed again.
I that at some point during the "Installing and launching..." the app tries to open but closes back immediately. Is it a crash? How do I get some sort of info regarding this? Thank you!
check these two things:
For iOS, the firebase_messaging functionality only works on real devices, it doesn't work on the simulator. (it does work in Android emulator)
Run open -a xcode ios/ and try to build the app there (⌘R), there will be more details on possible errors, specially regarding filling in the Signing section. Even if it's not signing, you will find out what it is, and after fixing it, the flutter cli will resume running without issues.
I created a brand new React-Native app using WebStorm. When I click on Run -> iOS to fire in iOS simulator, I don't see iOS simulator loading. I don't see any errors also. Here is the screenshot after I run the project.
Now I could run react-native run-ios to get iOS simulator to work (btw which works), but I would like WebStorm to fire simulator so that I can use in-built debugger in WebStorm.
What webStorm and react-native versions do you use? looks similar to WEB-29569, fixed in 2017.3
It's possible that WebStorm uses not latest version of react native that caused some troubles with Xcode version.
First you need to upgrade your Xcode to currently latest version.
Second you would better use stable version of Node JS.
I recommend you not to create app with WebStorm. For today the best way to create new app is create-react-native-app command line tool. It will create app using expo kit. As app will be initialized - run npm start (or better yarn start if you have it, because yarn is optimized version of npm). As it loaded it will show you QR code in terminal witch is you should read with your device and it will install Expo App and open your app inside it. Also you can press i to run iOS simulator.
Here is short documentation for creating app with create-react-native-app. Follow this steps and everything will be all right.
https://facebook.github.io/react-native/docs/getting-started.html
I try to make my first steps using React Native. Development for Android (on Windows host) works. Now I wanted to test iOS, and tried to set up a development environment on a MacBook Pro.
Problem: React Native starts the iOS simulator, and then nothing happens any more. The simulator runs OK, but my React native app won't start.
What do I need to do to get my React Native installation going?
More Info:
I set up XCode and React Native according to the docs on the MacBook Pro running OSx 10.13.2 (High Sierra). XCode was installed and tested successfully, including the simulator.
When I installed Node.js I deliberately picked an older version (containing npm 4.2.0), since forums say that React Native does still have problems with npm 5. I also installed Homebrew and Watchman, like stated in the docs.
To initialize an empty project, I used
create-react-native-app HelloWorldProject
and a projet structure got created in my Documents folder.
If I finally fire up my "Hello World" test app using
cd HelloWorldProject
sudo react-native run-ios
the system responds:
Starting packager ...
Starting simulator ...
and then nothing happens. The simulator does indeed start (boot --> apple logo --> progress bar --> IOs start screen), but nothing happens afterwards.
Edit
I have given up on React Native for several reasons, I leave this question here for documentary purposes, but I cannot verify or accept any answer, I don't have a React Native development environment any more.
It's probably because you used sudo. /.expo/ is owned by root. Try to change the ownership with
sudo chown -R `whoami` ~/.expo
Refer https://github.com/react-community/create-react-native-app/issues/422
Even everything in your app seems fine, sometime you face the issue that the app is taking too much time to load either through terminal or Xcode. If there is no any other specific issue with your project, the following solution works most of the time:
Go to your app folder and then go to 'iOS' folder.
Delete 'Podfile.lock' and 'Pods' folder.
Execute the following command in Terminal from your 'ios' folder, that will bring back the 'Podfile.lock' and required Pods will be installed to 'Pods' folder:
pod install
Delete the 'build' folder in your 'iOS' folder.
Run the following command in terminal:
react-native run-ios
While the terminal is running, open '.xcworkspace' in your 'ios' folder in Xcode.
The above steps will make sure it will be build your react native project newly and will run on the simulator.
Thanks
Wasantha Wijayaratna
As part of fabric integration I have installed Fabric mac app,
I found that whenever I run the project(I am running iOS app through XCode), the Fabric app also gets launched automatically,
My Questions are:
Why it automatically launches when running project ?
Is there a way I can stop this happening ?
FYI: The same happens even when the app is running in simulator.
Mike from Fabric here. It's an odd behavior that you're seeing and is most likely due to an old version of the Run Script. Years ago, the run script build phase required the Fabric app to be present in order to handle the actual uploading of the dSYMs. We would move the dSYMs during the build of the app to a location that the Fabric app would then asynchronously upload them. That behavior was changed a long way back, but it's possible a new version never was included. The current version is: Fabric.framework/run 1.6.2 (205)
I'd check the version by running ./run -v from the project and update your Fabric and Crashlytics frameworks.
You can also remove Fabric.app completely from your system and switch to using CocoaPods or manual installation instructions. It hasn't been required to use for a couple of years.