Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am new to the overall iOS Programming - Swift. I am wondering that if I create a project in xCode6 and then I would like to share an image that I took from my project for example to evernote, google drive, messages, email, facebook, twitter,so on and so on.
So, how would I do that? Is it something, I need to enable from xcode6 for each sharing extension or I need to implement swift code to enable these sharing extensions?
What kind of configurations I might needs to change to get sharing extensions (mentioned above) enabled? Or what kind of code changes in a project are possible? Are there any examples or samples out there with the instructions that I can look into and see how they implement into xcode6.
I never work with the sharing extensions before, so any knowledge that can be shared will be a great resource for me. Thanks in advance!
Use the Xcode Share Template.
There is a lot of tutorials online to know how to make share extensions using Swift, here are some of them and some good articles about extensions you should know too :
Building a Simple Share Extension in iOS 8 App
Xcode 6 Tutorial: iOS 8 Simple Share Extension in Swift
App Extension Programming Guide
Share extensions in iOS 8: Explained
Even you could do it in code too in the following way:
#IBAction func shareSheet(sender: AnyObject){
let firstActivityItem = "Hey, check out this mediocre site that sometimes posts about Swift!"
let secondActivityItem : NSURL = NSURL(fileURLWithPath: "http://www.dvdowns.com/")!
let activityViewController : UIActivityViewController = UIActivityViewController(
activityItems: [firstActivityItem, secondActivityItem], applicationActivities: nil)
activityViewController.excludedActivityTypes = [
UIActivityTypePostToWeibo,
UIActivityTypePrint,
UIActivityTypeAssignToContact,
UIActivityTypeSaveToCameraRoll,
UIActivityTypeAddToReadingList,
UIActivityTypePostToFlickr,
UIActivityTypePostToVimeo,
UIActivityTypePostToTencentWeibo
]
self.presentViewController(activityViewController, animated: true, completion: nil)
}
The above code only works for iPhones because for iPad you need to specify the sourceView and show it as a popover in the following way:
activityViewController.popoverPresentationController?.sourceView = (sender as! UIButton)
The above line must be put in just after you init the activityViewController and it should be work.
I hope this help you.
Related
I am developing an app in Xcode 9 and Swift 4. The app allows the user to use their device camera or photo library to select a photo, however, it will not display the edit button to allow the user to edit the image from within the app as it does when the user is not within an app.
I have added the privacy permissions in the plist file and I have searched StackOverflow, Google, Youtube, and this developer forum, but cannot find anything of a recent nature. I did find a question from 5 years and 7 months ago which stated that it was an Apple proprietary functionality. I was hoping that something has changed to allow this functionality from with an app. Any insights would be greatly appreciated.
Thanks !
Tom
You have to write an image editor yourself or use an existing libraries,
Here is an example to get you started:
https://github.com/eventtus/photo-editor
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Creating Localization Files for iOS
i have my iPhone company app in English language and we are international company, so how can I share my App for all translators f.e. by simulator or something else ?
f.e. translator translate the text and need view effect on iPhone, how can I do this?
It looks like you are searching for localization for your application.
Please follow this link:
Localization example link 1
Localization example Link 2
Link 3
Best link: Best Link...
Hope it works for you.
You can look at incorporating the Greenwich framework into your app. I've not used it myself, but saw it demo'd at a conference recently. It will let the translators make the changes to the app that you distribute to them as an ad-hoc build and then see them running in your app.
This is the message I got from them:
We found that the experience your app provides is not sufficiently
different from a web browsing experience, as it would be by
incorporating native iOS functionality.
While your app content may differ from your web site or other existing
sites, the experience it provides does not differ significantly from
the general experience of using Safari, as required by the App Store
Review Guidelines.
You may wish to provide convenient access to a web property for a
select or niche group of users - and may enhance that experience with
features such as Push Notifications. However, such apps do not include
enough native iOS functionality to be appropriate for the App Store.
As an alternative, you may wish to provide instructions to your users
on how to create a Safari web clip to add to their iOS device Home
Screen. Or, if you would like to share the app with a select group of
users, we recommend the Ad Hoc distribution method. See the iOS
Provisioning Portal for details on Ad Hoc Distribution.
We encourage you to review your app concept and evaluate whether you
can incorporate additional features to enhance the user experience.
Has anyone gotten something similar? What types of native iOS functionality would work and how do you implement them? I'm new to the app store so I don't know if just by adding what they say about providing instructions on how users can create safari web clipping will get my app approved. Also, if the instructions can just be written in a pop up message?
Any advice will be greatly appreciated. Thank you.
Update
I see what you guys are saying, let me better describe what I'm doing and maybe that way you can help me.
My app is a radio app where I can listen to my favorite radio station and read the news at the same time with out leaving the app (news from a web view).
From that message (and since you didn't give a description of the app at all), it seems like you just made an app that encapsulated an UIWebView to load an specific page, since you can do that via Safari, they reject apps like that.
You can:
Make the app fetch the data from the web server, BUT, display it with native controls (with UITableViews, UIButtons, UIImages, etc). This would require quite a bit amount of work.
Drop the app and tell the users, on your site, that they can add that website as a web clip on their phones.
They're saying that you can't just make a UIWebView that is linked to a website and call it an app. You have to incorporate more features. According to the description, your users can accomplish the same tasks by just going to your website. Are you able to incorporate push notifications, tabs, any features that makes your iOS app unique?
As of 2018 App Store Review Guidelines:
4.2 Minimum Functionality
Your app should include features, content, and UI that elevate it beyond a repackaged website. If your app is not particularly useful, unique, or “app-like,” it doesn’t belong on the App Store. If your App doesn't provide some sort of lasting entertainment value, or is just plain creepy, it may not be accepted. Apps that are simply a song or movie should be submitted to the iTunes Store. Apps that are simply a book or game guide should be submitted to the iBooks Store.
Assuming:
Apps that are simply a websites should be submitted to the Safari. ;-)
They want to ensure that all app's include functionality beyond the base components in the SDK that they provide to you. It seems from reading their response that there is a UIWebView in your app, yet there is not really any new functionality provided to the end-user beyond the standard UIWebView.
Would need more details about your app to better understand the circumstance though. Could you expand a little on what it does?
just change it with WKWebView and it will be accepted cause its a new guidelines imposed by apple recently
import WebKit
var webView: WKWebView!
override func loadView() {
let webConfiguration = WKWebViewConfiguration()
webView = WKWebView(frame: .zero, configuration: webConfiguration)
webView.uiDelegate = self
view = webView
}
override func viewDidLoad() {
super.viewDidLoad()
let myURL = URL(string:"https://www.apple.com")
let myRequest = URLRequest(url: myURL!)
webView.load(myRequest)
}
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I am new on iOS programming. I download some samples from apple website.
How do I know what's kind of the sample? View-Based, Window-based, Navigation-based etc.
To add to what #Steve said ( I was editing answer for some time now ... you put it better than I had :)), template does not create any indicator that allows you to find what kind of project. Of course the SDK setting and the run setting can help you understand if its for Iphone or MAC.
But if your project is created with some standard template, it is possible to understand which of those template was used.
Navigate to the .xcodeproj file for the corresponding project. CMD + click ( or right click) and choose open package contents. Open the .pbxproj file. By default this will open in Xcode, search for the term "Template". This will probably point you to the right direction.
Your question "[...] what's kind of an iOS Application? [...] View-Based, Window-based, Navigation-based etc." implies that these templates which ship with Xcode create fundamentally different "kinds" of applications.
This is not true.
All of those project templates create the same kind of project.
They are simply there as a quick-start convenience.
View-based, Window-based, ... are actually the names given to project templates in Xcode. When choosing one at project creation, Xcode provides the stuff you will need, which includes subclasses of common controller classes.
In almost all cases, an iOS app will show a window, and a view inside, so you can consider facing a window-based or a view-based app every time.
About the others, have a look to the files Xcode put in the project folder, you should find a UINavigationController when working with a navigation-based app, and for example a UITabBarController when you develop a tab-based app.
Finally, the best answer you will find is actually in the excellent View Controller Programming Guide for iOS provided by Apple.
Good luck.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have been tasked with investigating the feasibility of writing an iPhone App to access our internal VoIP/SIP systems.
I've never coded anything close to VoIP before. Are there any open source VoIP/SIP libraries or examples in C or Objective-C?
An iOS App that I can skin and add our required features to (mainly UI related) would be the holy grail here.
You may take a look at siphon (http://code.google.com/p/siphon/).
From their homepage:
Home of the World's first free
SIP/VoIP application for iPhone and
iPod Touch 1 and 2.
Siphon SIP/VoIP project is the first
in his category that works on iPhone
and iPod Touch 2 with headset for all
SIP providers. It is a native
application approved running on 2.X
using internal micro/speaker and
headset.
The Application supports the SIP
standard, preserving compatibility
with hundreds of SIP providers and
offers a GUI which preserves the apple
design of native iPhone applications.
PORT SIP
If you are a new comer on VOIP i would suggest using simple sdk's like PORTSIP
It is free download.you can check the app and make calls and also play around with the call.It is payable only if you want to use it for business.PORTSIP sdk is very easy compared to other sdk's or open source projects.
-ves
Not open source,offers less flexibility
LINPHONE
After you get hold of this you go for the open source projects Linphonen/PJSIP etc.
Linphone offers high quality sound but is very complicated to integrate and very less documentation is available.you will have to build the project first.http://shallwelearn.com/blog/build-linphone-for-iphone-and-ipad/ (for IOS)
-ve s
Very poor documentation
-PJSIP
Your best option is PJSIP which is very good with documentation and offers everything.Because you get code from scratch you can do anything with the code.
I highly recommend PJSIP.But it is difficult to directly go and devolep in PJSIP ,what i would recommend is do sample stuff on simple projects like portsip and go for PJSIP
Although it's rather old thread, for reference I add here also pjsip: http://www.pjsip.org that has a quite mature iOS port nevertheless it is written in C and its API is also in C.
UPDATE as of 06/2021: please note that this answer was originally written 9 years ago. I completely off from VoIP development now and can't take any responsibility wether pjsip is still working on iOS or swift.
Also there's Linphone for iPhone: http://www.linphone.org/eng/linphone/news/linphone-for-iphone.html
It supports G711, speex narrowband and wideband and iLBC codecs. Configured with your favourite SIP gateway it will allow you to run calls to PSTN numbers from your mobile using 3G or wifi
http://www.pjsip.org is not the most perfect.
Video is available on PJSIP version 2.0 and later. Only desktop platforms are supported, mobile devices such as iOS are not yet supported. This document describes how to use the video feature with PJSIP.
Follow this link it will give you perfect solution
http://www.xianwenchen.com/blog/2014/06/09/how-to-make-an-ios-voip-app-with-pjsip-part-1/
I use siphon, try this:
os-mac
ide-X