16

Is it possible to open the message composer interface in the iPhone simulator in xcode? if it is can someone tell me how.. I really need it now and having hard times finding a solution how and why my code does not work on simulator.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Aldee
  • 4,439
  • 10
  • 48
  • 71

3 Answers3

21

It is not possible. This is one of the limitations of iOS Simulator. You also cannot test push notifications, iCloud, etc. If you need to test your code, you will have to join Apple's iOS Developer Program and test the app on your device. It's $99 per year.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Jack Humphries
  • 13,056
  • 14
  • 84
  • 125
  • ahh.. i see.. thanks jack but one more question, when sending only email to contacts, does iOS has also interface the same with messaging or we can create our custom interface and send it not relying on their interface? – Aldee Jan 26 '12 at 00:36
  • @AldeeMativo Not exactly sure what you're asking here... Could you please clarify? – Jack Humphries Jan 27 '12 at 00:24
  • what i mean is that can we create our custom interface for sending email? – Aldee Jan 27 '12 at 03:14
  • I realise this is old but worth mentioning: you cannot create your own interface to send messages via the native APIs. You must present Apple's UI from the MessageUI framework. This ensures malicious apps can't send messages without the user's knowledge, same as email. – silver_belt Aug 26 '13 at 23:01
12

Just as an update to this post, it's still true that you can't test these features on the iOS simulator; however, you CAN run your apps on your own personal device without having to pay for the $99/year developer license.

You can now just plug your phone in, wait for XCode to download and process some files, and then select your device from the "Devices" dropdown.

Here are a couple of resources that helped me out when getting this set up:

Xcode "Device Locked" When iPhone is unlocked

https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/LaunchingYourApponDevices/LaunchingYourApponDevices.html

Community
  • 1
  • 1
John T
  • 774
  • 8
  • 10
  • I use an old iPod Touch to run my apps, but it doesn't have the ability to send SMS messages. If I were to get an old iPhone just for testing, would I be able to send SMS without actually having the phone on a plan? – primehalo Jul 03 '18 at 00:10
  • 1
    As far as I know, you can't send SMS messages without a phone plan. I don't know your specific constraints for your app, whether you need to send SMS specifically or any text message, but you definitely can send iMessages from an iPhone without a SIM card. You just need to connect it to WiFi. I don't know if that helps or not, but it's an option. – John T Jul 03 '18 at 14:40
-2

iOS Simulator is just a simulator that emulates the actual thing but Apple waters it down for developer usage. Many features are not available on the iOS Simulator because those features are not required for developers. Also Apple might have watered it down just to save storage and clear out unneeded features for iOS developers.