Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #252 from mono/facebookios-update
Browse files Browse the repository at this point in the history
Facebookios update
- Updated binding and sample to version 4.4.0
- Updated binding to version 4.3.0
  • Loading branch information
SotoiGhost committed Jul 16, 2015
2 parents 8bb9504 + bfd4a38 commit 061b5bd
Show file tree
Hide file tree
Showing 20 changed files with 64 additions and 53 deletions.
30 changes: 15 additions & 15 deletions facebookios/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
facebook
========

These are bindings to the native Facebook SDK for iOS, currently we bind version 4.0.1.
These are bindings to the native Facebook SDK for iOS, currently we bind version 4.4.0.

Using
=====
Expand All @@ -23,25 +23,25 @@ program, it covers about half of the features in it.
License
=======

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Copyright (c) 2014-present, Facebook, Inc. All rights reserved.

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
copy, modify, and distribute this software in source code or binary form for use
in connection with the web services and APIs provided by Facebook.

As with any software that integrates with the Facebook platform, your use of
this software is subject to the Facebook Developer Principles and Policies
[http://developers.facebook.com/policy/]. This copyright notice shall be
included in all copies or substantial portions of the software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE.


Authors
=======

Expand Down
8 changes: 4 additions & 4 deletions facebookios/binding/ApiDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1497,10 +1497,6 @@ interface AppGroupContent : CoreKit.Copying, INSSecureCoding
[Export ("groupDescription", ArgumentSemantic.Copy)]
string GroupDescription { get; set; }

// @property (copy, nonatomic) NSString * groupID;
[Export ("groupID", ArgumentSemantic.Copy)]
string GroupID { get; set; }

// @property (copy, nonatomic) NSString * name;
[Export ("name", ArgumentSemantic.Copy)]
string Name { get; set; }
Expand Down Expand Up @@ -1908,6 +1904,10 @@ interface ShareAPI : Sharing
[Export ("message", ArgumentSemantic.Copy)]
string Message { get; set; }

// @property (nonatomic, copy) NSString *graphNode;
[Export ("graphNode", ArgumentSemantic.Copy)]
string GraphNode { get; set; }

// -(BOOL)canShare;
[Export ("canShare")]
bool CanShare ();
Expand Down
2 changes: 0 additions & 2 deletions facebookios/binding/Facebook.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
<RootNamespace>Facebook</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>Facebook</AssemblyName>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
8 changes: 5 additions & 3 deletions facebookios/binding/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MONOXBUILD=/Library/Frameworks/Mono.framework/Commands/xbuild
DATE=20150528
VERSION=4.2.0
DATE=20150708
VERSION=4.4.0

all: Facebook-Unified.dll

Expand All @@ -20,9 +20,11 @@ Facebook-Unified.dll: Makefile ApiDefinition.cs StructsAndEnums.cs FBSDKCoreKit.
$(MONOXBUILD) /t:Clean Facebook.csproj
$(MONOXBUILD) /p:Configuration=Release Facebook.csproj
mkdir -p build/unified/
mkdir -p ../../../facebookios/build/unified/
cp bin/unified/Release/Facebook.dll build/unified/Facebook.dll
cp bin/unified/Release/Facebook.dll ../../../facebookios/build/unified/

prepare: FBSDKCoreKit.a

clean:
-rm -rf list ios Resources/ FacebookSDKs-iOS-$(DATE)/ bin/ obj/ build/ *.sln *.userprefs *.dll *.o *.zip *.pkg *.mdb *.a
-rm -rf list ios Resources/ FacebookSDKs-iOS-$(DATE)/ bin/ obj/ build/ ../../../facebookios/build/ *.sln *.userprefs *.dll *.o *.zip *.pkg *.mdb *.a
2 changes: 1 addition & 1 deletion facebookios/binding/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion ("4.2.0")]
[assembly: AssemblyVersion ("4.4.0")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
3 changes: 2 additions & 1 deletion facebookios/binding/StructsAndEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public enum ErrorCode : long
GraphRequestNonTextMimeTypeReturned,
GraphRequestProtocolMismatch,
GraphRequestGraphAPI,
DialogUnavailable
DialogUnavailable,
AccessTokenRequired
}

[Native]
Expand Down
14 changes: 14 additions & 0 deletions facebookios/samples/FacebookiOSSample/FacebookiOSSample.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FacebookiOSSample", "FacebookiOSSample\FacebookiOSSample.csproj", "{FB530EE3-BAED-46B1-9703-D33D85E58A92}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook", "..\..\binding\Facebook.csproj", "{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Expand All @@ -13,6 +15,18 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}.Debug|iPhone.Build.0 = Debug|Any CPU
{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}.Release|Any CPU.Build.0 = Release|Any CPU
{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}.Release|iPhone.ActiveCfg = Release|Any CPU
{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}.Release|iPhone.Build.0 = Release|Any CPU
{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{FB530EE3-BAED-46B1-9703-D33D85E58A92}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{FB530EE3-BAED-46B1-9703-D33D85E58A92}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{FB530EE3-BAED-46B1-9703-D33D85E58A92}.Debug|iPhone.ActiveCfg = Debug|iPhone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using UIKit;
using Facebook.CoreKit;

namespace FBExam
namespace FacebookiOSSample
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using MonoTouch.Dialog;

namespace FBExam
namespace FacebookiOSSample
{
public class CustomCheckboxElement : CheckboxElement
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Foundation;
using MonoTouch.Dialog;

namespace FBExam
namespace FacebookiOSSample
{
public class CustomStringElement : StringElement
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<DefineConstants>DEBUG;ENABLE_TEST_CLOUD;</DefineConstants>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
Expand All @@ -71,16 +71,15 @@
<MtouchUseRefCounting>true</MtouchUseRefCounting>
<MtouchI18n>
</MtouchI18n>
<IpaPackageName>
</IpaPackageName>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
<Reference Include="MonoTouch.Dialog-1" />
<Reference Include="Facebook">
<HintPath>..\packages\Xamarin.Facebook.4.2.0.0\lib\Xamarin.iOS10\Facebook.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Contents.json" />
Expand All @@ -92,7 +91,6 @@
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
Expand All @@ -111,4 +109,10 @@
<ItemGroup>
<BundleResource Include="Resources\wolf.jpg" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\binding\Facebook.csproj">
<Project>{B6F34C95-4E37-44F3-AB6A-3DD7DBB61789}</Project>
<Name>Facebook</Name>
</ProjectReference>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using Facebook.LoginKit;
using CoreGraphics;

namespace FBExam
namespace FacebookiOSSample
{
public partial class ListDetailViewController : DialogViewController
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

using Facebook.CoreKit;

namespace FBExam
namespace FacebookiOSSample
{
public partial class ListViewController : DialogViewController
{
public ListViewController (FacebookListType type) : base (UITableViewStyle.Grouped, null, true)
{
var kindListName = type == FacebookListType.Friends ? "Friendlists" : "Groups";
var kindListName = type == FacebookListType.Friends ? "friendlists?fields=id,name" : "groups";

Root = new RootElement (kindListName);
Root = new RootElement (type == FacebookListType.Friends ? "Friendlists" : "Managed Groups");

// Depends of what you want to see, list all your groups or all your friendslist that you have
var request = new GraphRequest ("/" + Profile.CurrentProfile.UserID + "/" + kindListName, null, AccessToken.CurrentAccessToken.TokenString, null, "GET");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using UIKit;

namespace FBExam
namespace FacebookiOSSample
{
public class Application
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using CoreGraphics;
using Foundation;

namespace FBExam
namespace FacebookiOSSample
{
public partial class MainViewController : DialogViewController
{
Expand Down Expand Up @@ -84,7 +84,7 @@ public override void ViewDidLoad ()
new CustomCheckboxElement ("Birthday", () => CheckReadPermission ("user_birthday")),
new CustomCheckboxElement ("Hometown", () => CheckReadPermission ("user_hometown")),
new CustomCheckboxElement ("Friendlists", () => CheckReadPermission ("read_custom_friendlists")),
new CustomCheckboxElement ("Groups", () => CheckReadPermission ("user_groups"))
new CustomCheckboxElement ("Managed Groups", () => CheckReadPermission ("user_managed_groups"))
};

// The user image profile is set automatically once is logged in
Expand Down Expand Up @@ -206,8 +206,8 @@ void AddActionsSection ()
NavigationController.PushViewController (new ListViewController (FacebookListType.Friends), true);
}));

if (AccessToken.CurrentAccessToken.HasGranted ("user_groups"))
actionsSection.Add (new StringElement ("See Groups", () => {
if (AccessToken.CurrentAccessToken.HasGranted ("user_managed_groups"))
actionsSection.Add (new StringElement ("See Managed Groups", () => {
NavigationController.PushViewController (new ListViewController (FacebookListType.Groups), true);
}));

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using Facebook.ShareKit;
using Facebook.CoreKit;

namespace FBExam
namespace FacebookiOSSample
{
public partial class PhotoViewController : DialogViewController
{
Expand Down

This file was deleted.

Binary file not shown.

This file was deleted.

0 comments on commit 061b5bd

Please sign in to comment.