Skip to content

Commit

Permalink
Removed requirement to use .mm files when using UnrarKit through Coco…
Browse files Browse the repository at this point in the history
…aPods (Closes case #3)
  • Loading branch information
abbeycode committed Nov 19, 2014
1 parent 824c5f1 commit 059b2e3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
10 changes: 6 additions & 4 deletions Example/UnrarExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
2899E5220DE3E06400AC0155 /* UnrarExampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* UnrarExampleViewController.xib */; };
28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
28D7ACF80DDB3853001CB0EB /* UnrarExampleViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* UnrarExampleViewController.mm */; };
28D7ACF80DDB3853001CB0EB /* UnrarExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* UnrarExampleViewController.m */; };
480F6005128A0C0B00A9B478 /* not_protected.cbr in Resources */ = {isa = PBXBuildFile; fileRef = 480F6002128A0C0B00A9B478 /* not_protected.cbr */; };
48BB62E31621B98300B424E2 /* protected.cbr in Resources */ = {isa = PBXBuildFile; fileRef = 48BB62E21621B98300B424E2 /* protected.cbr */; };
96BBCACF18DE82D900BE9B86 /* libUnrarKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 96BBCACE18DE82D900BE9B86 /* libUnrarKit.a */; };
Expand All @@ -31,7 +31,7 @@
2899E5210DE3E06400AC0155 /* UnrarExampleViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = UnrarExampleViewController.xib; sourceTree = "<group>"; };
28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
28D7ACF60DDB3853001CB0EB /* UnrarExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnrarExampleViewController.h; sourceTree = "<group>"; };
28D7ACF70DDB3853001CB0EB /* UnrarExampleViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UnrarExampleViewController.mm; sourceTree = "<group>"; };
28D7ACF70DDB3853001CB0EB /* UnrarExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UnrarExampleViewController.m; sourceTree = "<group>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* UnrarExample_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnrarExample_Prefix.pch; sourceTree = "<group>"; };
480F6002128A0C0B00A9B478 /* not_protected.cbr */ = {isa = PBXFileReference; lastKnownFileType = file; path = not_protected.cbr; sourceTree = "<group>"; };
Expand Down Expand Up @@ -62,7 +62,7 @@
1D3623240D0F684500981E51 /* UnrarExampleAppDelegate.h */,
1D3623250D0F684500981E51 /* UnrarExampleAppDelegate.m */,
28D7ACF60DDB3853001CB0EB /* UnrarExampleViewController.h */,
28D7ACF70DDB3853001CB0EB /* UnrarExampleViewController.mm */,
28D7ACF70DDB3853001CB0EB /* UnrarExampleViewController.m */,
);
path = Classes;
sourceTree = "<group>";
Expand Down Expand Up @@ -189,7 +189,7 @@
files = (
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
1D3623260D0F684500981E51 /* UnrarExampleAppDelegate.m in Sources */,
28D7ACF80DDB3853001CB0EB /* UnrarExampleViewController.mm in Sources */,
28D7ACF80DDB3853001CB0EB /* UnrarExampleViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -246,6 +246,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 3.0;
ONLY_ACTIVE_ARCH = YES;
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
OTHER_LDFLAGS = "-lc++";
PREBINDING = NO;
SDKROOT = iphoneos;
};
Expand All @@ -259,6 +260,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 3.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
OTHER_LDFLAGS = "-lc++";
PREBINDING = NO;
SDKROOT = iphoneos;
};
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ I've included a sample [`podfile`](Example/Podfile) in the Example directory alo

# Notes

Since UnrarKit uses C++ libraries, you will need to change the extension of classes that use UnrarKit to `.mm`. This will include `libstdc++` in the linking stage. If you would like to keep your extension `.m` (though I'm not sure what the advantage would be), you will need to add `libstdc++` to the linker flags in your application.

To open in Xcode, use the [UnrarKit.xcworkspace](UnrarKit.xcworkspace) file, which includes the other projects.

# Credits
Expand Down
4 changes: 2 additions & 2 deletions Resources/UnrarKit-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.2.3</string>
<string>2.2.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.2.3</string>
<string>2.2.4</string>
</dict>
</plist>
5 changes: 3 additions & 2 deletions UnrarKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "UnrarKit"
s.version = "2.2.3"
s.version = "2.2.4"
s.summary = "A port of the UnRAR library for the iOS and Mac platforms"
s.license = "BSD"
s.homepage = "https://github.com/abbeycode/UnrarKit"
Expand Down Expand Up @@ -87,6 +87,7 @@ Pod::Spec.new do |s|
"Libraries/unrar/unpackinline.cpp",
"Libraries/unrar/uowners.cpp",
"Libraries/unrar/win32stm.cpp"
s.xcconfig = { "OTHER_CFLAGS" => "$(inherited) -Wno-return-type -Wno-logical-op-parentheses -Wno-conversion -Wno-parentheses -Wno-unused-function -Wno-unused-variable -Wno-switch",
s.xcconfig = { "OTHER_LDFLAGS" => "$(inherited) -lc++",
"OTHER_CFLAGS" => "$(inherited) -Wno-return-type -Wno-logical-op-parentheses -Wno-conversion -Wno-parentheses -Wno-unused-function -Wno-unused-variable -Wno-switch",
"OTHER_CPLUSPLUSFLAGS" => "$(inherited) -DSILENT -DRARDLL $(OTHER_CFLAGS)" }
end

0 comments on commit 059b2e3

Please sign in to comment.